import request from '@/utils/request'

export default {

    // 根据市级获取区级
    getAllDistrictThree(province, city) {
        return request({
            url: `/inner/city/getAllDistrict/${province}/${city}`,
            method: 'get',


        })
    },
    //所有省级
    getAllProvince() {
        return request({
            url: `/inner/city/getAllProvince`,
            method: 'get',
        })
    },


    //根据省级获取市级
    getAllPCity(province) {
        return request({
            url: `/inner/city/getAllPCity/${province}`,
            method: 'get',
        })
    },

    getAllDistrictList(current, limit, cityQueryVo) {
        return request({
            url: `/inner/city/getAllDistrictList/${current}/${limit}`,
            method: 'post',
            data: cityQueryVo
        })
    },
    //所有省级
    getAllProvinceList(current, limit, cityQueryVo) {
        return request({
            url: `/inner/city/getAllProvinceList/${current}/${limit}`,
            method: 'post',
            data: cityQueryVo
        })
    },


    //根据省级获取市级
    getAllCityList(current, limit, cityQueryVo) {
        return request({
            url: `/inner/city/getAllPCityList/${current}/${limit}`,
            method: 'post',
            data: cityQueryVo
        })
    },
    //新增
    CityAdd(cityCom) {
        return request({
            url: `/inner/city/CityAdd`,
            method: 'post',
            data: cityCom
        })
    },
    //修改 省级
    cityUpdate(cityCom) {
        return request({
            url: `/inner/city/cityUpdate/`,
            method: 'post',
            data: cityCom
        })
    },
 //修改 市级
 cityUpdateCity(cityCom) {
    return request({
        url: `/inner/city/cityUpdateCity/`,
        method: 'post',
        data: cityCom
    })
},
 //修改  区级
 cityUpdateCounter(cityCom) {
    return request({
        url: `/inner/city/cityUpdateCounter/`,
        method: 'post',
        data: cityCom
    })
},

    //详情
    cityByName(cityCode) {
        return request({
            url: `/inner/city/cityByName/${cityCode}`,
            method: 'get',

        })
    },
        //详情 市级别
        cityCityByName(cityCode) {
            return request({
                url: `/inner/city/cityCityByName/${cityCode}`,
                method: 'get',
    
            })
        },

    //删除
    deleteCityByCityCode(cityCode) {
        return request({
            url: `/inner/city/deleteCityByCityCode/${cityCode}`,
            method: 'delete',

        })
    },
}